﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ScoreLevel.aspx.cs" Inherits="Credit_Teacher_RuleSettings_ScoreLevel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>学分级别</title>
   <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .noneClick {
            cursor: default;
        }
    </style>

    <script type="text/javascript" src="../../Common/js/jquery.js"></script>

    <script type="text/javascript" src="../../Common/js/common.js"></script>
    
    <script type="text/javascript">
 //--------------------------------------------------------------------------添加 
function AddRow()
{
    var table = document.getElementById('table');
    var row = table.insertRow();
 
    var td =   row.insertCell();
    td = row.insertCell();
    td = row.insertCell();
    td = row.insertCell();
    td.innerHTML = "<a><img src='../../../Common/images/delete_icon.gif' onclick='DelRow(this.parentElement.parentElement.parentElement)'/></a>"        
}


//------------------------------------------------------------------------------删除
function DelRow(row)
{
    var table = document.getElementById('table');
    table.deleteRow(row.rowIndex);
}  


 //选中行高亮
function SetHightLight(obj)
{
    if(obj != null) 
        obj.style.backgroundColor = "#fffccf";
        
    var table = document.getElementById('table');
    for(var i =0 ; i < table.rows.length;i++)
    {
        var row = table.rows[i];
        if(row != null && row.rowIndex != obj.rowIndex)
        {
            row.style.backgroundColor = "#ffffff";
        }
    }
} 
    </script>
    
    
</head>
<body>
     <div style="overflow-y: auto; overflow-x: none; height: 98%;">
        <form id="form1" runat="server">
            <div class="mainWarp">
                <div class="pageBody" style="height: 96%;">
                    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                    </asp:ScriptManager>
                    <label>2009－2010学年 下学期 各科日常评分规则一览表</label>
                    <ul class="butList">
                        <li>
                            <input type="button" value="新增" class="commonBut" id="btnAdd" onclick="AddRow();" />
                            <input type="button" value="保存" class="commonBut" id="btnSave" />
                        </li>
                    </ul>
                    
                    <div style=" float:left;height: 100%;">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <%--<asp:Repeater ID="Repeater1" runat="server">
                                    <HeaderTemplate>--%>
                                   
                                    <div style="overflow-y: auto; overflow-x: none; height: 90%;">
                                        <table id="table" class="useList" style="width: 95%">
                                            <tr onclick="SetHightLight(this);">
                                                <th style="text-align: left; padding-left: 5px;">
                                                    等级</th>
                                                <th style="text-align: left; padding-left: 5px;">
                                                    上限</th>
                                                <th style="text-align: left; padding-left: 5px;">
                                                    下限</th>
                                                <th style="text-align: left; padding-left: 5px;">
                                                    删除</th> 
                                            </tr>
                                    <%--</HeaderTemplate>
                                    <ItemTemplate>--%>
                                            <tr>
                                                <td>优秀</td>
                                                <td>100</td> 
                                                <td>80</td>
                                                <td><a><img src="../../../Common/images/delete_icon.gif" onclick="DelRow(this.parentElement.parentElement.parentElement)"/></a></td> 
                                            </tr>
                                            <tr>
                                               <td>良好</td>
                                                <td>80</td> 
                                                <td>60</td>
                                                <td><a><img src="../../../Common/images/delete_icon.gif" onclick="DelRow(this.parentElement.parentElement.parentElement)"/></a></td> 
                                            </tr>
                                            <tr>
                                                <td>不及格</td>
                                                <td>60</td> 
                                                <td>0</td>
                                                <td><a><img src="../../../Common/images/delete_icon.gif" onclick="DelRow(this.parentElement.parentElement.parentElement)"/></a></td> 
                                            </tr>
                                             
                                    <%--</ItemTemplate>
                                    <FooterTemplate>--%>
                                        </table></div> 
                                    <%--</FooterTemplate>
                                </asp:Repeater>--%>
                                 
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                        <%--服务器端控件层--%>
                        <div style="display: none;">
                            <asp:Button runat="server" ID="btnBind"   />
                            
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</body>
</html>
